Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#82B799",
    list: [
      {
        pagePath: "/pages/index/index",
        iconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer01.png",
        selectedIconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer01ac.png",
        text: "首页"
      },
      {
        pagePath: "/pages/guide/index",
        iconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer02.png",
        selectedIconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer02ac.png",
        text: "智慧导览"
      },
      {
        pagePath: "/pages/play/index",
        iconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer03.png",
        selectedIconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer03ac.png",
        text: "游玩攻略"
      },
      {
        pagePath: "/pages/mine/index",
        iconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer04.png",
        selectedIconPath: "https://winbz.oss-cn-hangzhou.aliyuncs.com/uploads/csyls/images/footer04ac.png",
        text: "我的"
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      console.log('点击底部导航')
      console.log(url)
      console.log(data.index)
      this.setData({
        selected: data.index
      })
    }
  }
})